package service;

import pojo.Label;
import pojo.NoteLabels;

import java.sql.SQLException;
import java.util.ArrayList;

public interface NoteLabelsService {
    /**
     * 笔记添加标签
     *
     * @param noteLabels
     * @return
     * @throws SQLException
     */
    boolean addNoteLabels(NoteLabels noteLabels) throws SQLException;

    /**
     * 某笔记的所有标签id
     *
     * @param nid
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    ArrayList<NoteLabels> noteLabelsList(Integer nid) throws SQLException, ClassNotFoundException;

    /**
     * 某笔记所有标签
     *
     * @param noteLabelsList
     * @return
     * @throws SQLException
     */
    ArrayList<Label> noteLabels(ArrayList<NoteLabels> noteLabelsList) throws SQLException;

    /**
     * 搜索后NoteLabels对象
     *
     * @param content
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    ArrayList<NoteLabels> searchAllLabels(String content) throws SQLException, ClassNotFoundException;

    /**
     * 精确搜索后NoteLabels对象
     *
     * @param labelSearch
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    ArrayList<NoteLabels> exatSearchAllLabels(String labelSearch) throws SQLException, ClassNotFoundException;

}
